package day16.tarena.GUI;
import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JButton;
import javax.swing.JTextField;
public class TestFlow {  //FlowLayout 是JPanel默认布局

	public static void main(String[] args) {
		JFrame jf = new JFrame("Test FLow");
		JTextField jtf = new JTextField(10);
		FlowLayout fl = new FlowLayout(FlowLayout.RIGHT);
		jf.setLayout(fl);
		jf.add(jtf);
		for(int i=0; i<10; i++){
			JButton jb = new JButton(i+" ");
			jf.add(jb);
		}
		jf.setLocation(300,200);
		jf.setSize(300,200);
		jf.setVisible(true);
		jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}

}
